package task07;

import java.util.Calendar;

/**
 * @author Administrator
 */
public class Tesk5 {
    public static void main(String[] args) {
        System.out.println("请输入当前月份：");
        Calendar cal=Calendar.getInstance();
        int month=cal.get(Calendar.MONTH);

        month+=1;
        String season="";
        switch (month){
            case 3:
            case 4:
            case 5:
            season="spring";
            break;
            case 6:
            case 7:
            case 8:
                season="summer";
                break;
            case 9:
            case 10:
            case 11:
                season="autumn" ;
                break;
            case 12:
            case 1:
            case 2:
                season="winter";
                break;
            default:
                season="wrong";
                break;
        }
        System.out.println("当前月份是："+month+"月：当前季节是："+season);
    }
}
